package com.example.chapter12.ocp.unused;

import java.util.ArrayList;
import java.util.List;

public class CourseManage {
    private static List list = new ArrayList();

    public void handle(String type, Course course) {
        if ("add".equals(type)) {
            list.add(course);
        } else if ("update".equals(type)) {
            list.remove(course);
            list.add(course);
        }else if ("delete".equals(type)) {
            list.remove(course);
            throw new RuntimeException();
        }
    }
}
